package com.ruoyi.common.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class ElasticsearchProperties implements ApplicationRunner {
	
	/**
     * ES地址,ip:port
     */
    @Value("${elasticsearch.ip}")
    String ipPort;

	@Override
	public void run(ApplicationArguments args) throws Exception {
		ElasticSearchUtils.init(ipPort);
	}
    
}
